package ressource;

import java.util.Date;

public class CadreVendeur {
	
	private String pseudo;
	private float note;
	private int nbVentes;
	private int acceptation;
	private Date dateCreation;
	private Integer idVendeur;
	private String avatar;
	
	public String getAvatar() {
		return avatar;
	}
	public void setAvatar(String avatar) {
		if(avatar == null)
			this.avatar = "../mouton11.jpg";
		else
			this.avatar = avatar;
	}
	public Integer getIdVendeur() {
		return idVendeur;
	}
	public void setIdVendeur(Integer idVendeur) {
		this.idVendeur = idVendeur;
	}
	public String getPseudo() {
		return pseudo;
	}
	public void setPseudo(String pseudo) {
		this.pseudo = pseudo;
	}
	public float getNote() {
		return note;
	}
	public void setNote(float note) {
		this.note = note;
	}
	public int getNbVentes() {
		return nbVentes;
	}
	public void setNbVentes(int nbVentes) {
		this.nbVentes = nbVentes;
	}
	public int getAcceptation() {
		return acceptation;
	}
	public void setAcceptation(int acceptation) {
		this.acceptation = acceptation;
	}
	public String getDateCreation() {
		if(dateCreation == null) return null;
		else{
			String[] buffer = dateCreation.toString().split("[- :]");
			return buffer[2] + "/" + buffer[1] + "/" + buffer[0];
		}
	}
	public void setDateCreation(java.util.Date date) {
		this.dateCreation = date;
	}
}
